package com.example.hospital.common;

import jakarta.validation.constraints.Min;
import lombok.Data;

@Data
public class PageQuery {
    @Min(1)
    private int page = 1;
    @Min(1)
    private int size = 10;

    public int offset() {
        return (page - 1) * size;
    }
}